import { BaseParser } from '../BaseParser';
export class IconParser extends BaseParser {
  parse(node: any) {
    this.transformTag({
      node: node,
      tag: 'span',
      className: 'ui-icon'
    });
    let { type, color, size = 16 } = node.attribs;
    if (type) {
      node.attribs.class += ` icon-${node.attribs.type}`;
    }
    if (color) {
      node.attribs.style += `color: ${color};`;
    }
    node.attribs.style += `font-size: ${size}px;`;
  }
}
